package com.whcoding.multithreading.thred;

/**
 * @program: spring-boot-learning
 * @description:
 * @author: whcoding
 * @create: 2022-06-10 15:20
 **/
public class MyThreadCreateThread extends Thread {


	@Override
	public void run() {
		for (int i = 0; i < 10; i++) {
			System.out.println(Thread.currentThread().getName() + " " + i);
		}
	}

	/**
	 * 创建2个线程执行数据
	 *
	 * @param args
	 */
	public static void main(String[] args) {
		Thread myThread = new MyThreadCreateThread();
		Thread myThread2 = new MyThreadCreateThread();
		myThread.start();
		myThread2.start();
	}

}
